package com.dx.spring6_15.beanExtends;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class Main {

	public static void main(String[] args) {
		
		ApplicationContext ctx = new ClassPathXmlApplicationContext("com/dx/spring6_15/beanExtends/beanExtendsApplicationContext.xml");
		
		Address address1 = (Address) ctx.getBean("address1");
		System.out.println(address1);
		
		Address address2 = (Address) ctx.getBean("address2");
		System.out.println(address2);
		
		// 抽象Bean 不能被实例化
//		Car car1 = (Car) ctx.getBean("car1");
//		System.out.println(car1);
		
		Car car2 = (Car) ctx.getBean("car2");
		System.out.println(car2);
		
	}
}
